import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/Layout/index.vue'
import Home from '../views/Home/index.vue'
import Login from '../views/Login/Login.vue'
const Grade = () => import('../views/Grade/Grade.vue')
const Judge = () => import('../views/Judge/Judge.vue')
const Report = () => import('../views/Report/Report.vue')
const System = () => import('../views/System/System.vue')
Vue.use(VueRouter)

const routes = [
 {
  path: '/',
  name: 'Layout',
  component: Layout,
  children: [
    {
      path: '/',
      name: 'Home',
      component: Home,
    },
    {
      path: '/grade',
      name: 'Grade',
      component: Grade,
    },
    {
      path: '/judge',
      name: 'Judge',
      component: Judge,
    },
    {
      path: '/report',
      name: 'Report',
      component: Report,
    },
    {
      path: '/system',
      name: 'System',
      component: System,
    }
  ]
  
  
 },{
  path: '/login',
  name: 'Login',
  component: Login,
  children: []
  
  
 }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
